package com.study.operateDB;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import java.util.Properties;
import java.util.Set;

public class ReadProperties {

	/**
	 * @param args
	 */
	public static Properties readRroperties(String filePath) {
		Properties prop = new Properties();
		InputStream in;
		try {
			in = new BufferedInputStream(new FileInputStream(filePath));
			prop.load(in);
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		// Set keyValue = prop.keySet();
		// for (Iterator it = keyValue.iterator(); it.hasNext();) {
		// String key = (String) it.next();
		// }
		//System.out.println(prop.getProperty("SQLSERVER_DRIVER_CALSS"));
		return prop;
	}
}
